package com.csu.controller;

import cn.dev33.satoken.annotation.SaCheckRole;
import com.csu.common.CommonResponse;
import com.csu.entity.Attendance;
import com.csu.service.AttendanceService;
import com.csu.vo.AttendanceRespVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("attendance")
public class AttendanceController {
    @Autowired
    AttendanceService attendanceService;

    /**
     * 家长获取子女的出勤记录
     */
    @GetMapping("")
    //@SaCheckRole("parent")
    public CommonResponse<List<AttendanceRespVO>> getAttendance(@RequestParam int id){
        System.out.println("id"+id);
        return attendanceService.getAttendance(id);
    }
}
